<!--#INCLUDE FILE="conn.asp"-->
<!-- #INCLUDE FILE="ad_function.asp" -->
<!-- #include file="ad_comSub.asp" -->

<%
Call tslt_useridentity12_error_end()
%>

<HTML>
<HEAD>
<TITLE></TITLE>
<link href=../style/<%=session("tslt_stylefolder")%>/admin.css rel="stylesheet" type="text/css">
</HEAD>
<BODY bgcolor=#aaaac4>
<CENTER>
<br>
<table><tr><td class="font2">ϵͳռռ</td></tr></table>
</CENTER>
<br>
<table class="table001" width="90%" border="0" align="center" cellpadding="0" cellspacing="0" style="BORDER-LEFT:#0098c8 1PX SOLID;BORDER-RIGHT:#0098c8 1PX SOLID;BORDER-TOP:#0098c8 1PX SOLID;BORDER-BOTTOM:#0098c8 1PX SOLID">
        <tr height="22"> 
                <td colspan=2 align="center" class="table003"><b>ϵͳռռ</b></td>
        </tr>
        <tr height="32"> 
                <td>
                          &nbsp;ϴļ(ͼƬӰ)ռÿռ䣺
                </td>
                <td>
                          <img src="../images/bar_blue2.gif" width=<%=drawbar("../ewebeditor/UploadFile")%> height=10>
                          <%showSpaceinfo("../ewebeditor/UploadFile")%>
                </td>
        </tr>
        <tr height="32">
                <td>
                          &nbsp;ϴļռÿռ䣺
                </td>
                <td>
                          <img src="../images/bar_red2.gif" width=<%=(showSpaceinfo2("../ewebeditor/UploadFile")-AllUpFileSize())/Showspecialspaceinfo2("All")*400 %> height=10>
                          <span style="font-size:14">
                          <%=FileContentSize2(showSpaceinfo2("../ewebeditor/UploadFile")-AllUpFileSize())%>
                          </span>
                </td>
        </tr>
        <tr height="32">
                <td>
                          &nbsp;ϵͳݿռÿռ䣺
                </td>
                <td>
                          <img src="../images/bar_blue2.gif" width=<%=drawbar("../lyDB")%> height=10>
                          <%showSpaceinfo("../lyDB")%>
                </td>
        </tr>
        <tr height="32">
                <td>
                          &nbsp;<font color=blue>ϴαݵݿϴļռÿռ䣺</font>
                </td>
                <td>
                          <img src="../images/bar_blue2.gif" width=<%=(drawbar("../MyCopyFolder/lyDB") + drawbar("../MyCopyFolder/UploadFile"))%> height=10>
                          <%=FileContentSize2(ShowSpaceInfo2("../MyCopyFolder/lyDB") + ShowSpaceInfo2("../MyCopyFolder/UploadFile"))%>
                </td>
        </tr>
        <tr height="32">
                <td >
                           &nbsp;ϵͳռÿռܼƣ
                </td>
                <td>
                          <img src="../images/bar_blue2.gif" width=400 height=10> 
                          <%showspecialspaceinfo("All")%>
                </td>
        </tr>
</table>

</BODY>
</HTML>

<%
Call conn_Nothing()

Function Drawbar(drvpath)
        dim fso,drvpathroot,d,size,totalsize,barsize
        set fso=server.createobject("scripting.filesystemobject")
        drvpathroot=server.mappath(".\")
        drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
        set d=fso.getfolder(drvpathroot)
        totalsize=d.size
	
        drvpath=server.mappath(drvpath) 		
        set d=fso.getfolder(drvpath)
        size=d.size
	
        barsize=cint((size/totalsize)*400)
        Drawbar=barsize
        set fso=nothing
End Function 	

Sub ShowSpaceInfo(drvpath)                  
         dim fso,d,size,showsize
         set fso=server.createobject("scripting.filesystemobject") 		
         drvpath=server.mappath(drvpath) 		 		
         set d=fso.getfolder(drvpath) 		
         size=d.size
         showsize=size & "&nbsp;Byte" 
         if size>1024 then
                size=(size\1024)
                showsize=size & "&nbsp;KB"
         end if
         if size>1024 then
                size=(size/1024)
                showsize=formatnumber(size,2) & "&nbsp;MB"		
         end if
         if size>1024 then
        size=(size/1024)
        showsize=formatnumber(size,2) & "&nbsp;GB"	   
        end if   
        response.write "<font face=verdana>" & showsize & "</font>"
        set fso=nothing
End Sub	

Function ShowSpaceInfo2(drvpath)
    dim fso,d,size,showsize
    set fso=server.createobject("scripting.filesystemobject") 		
    drvpath=server.mappath(drvpath)
    If fso.FolderExists(drvpath)=True Then
        Set d=fso.getfolder(drvpath) 		
        size=d.size
        ShowSpaceInfo2=size
        Set fso=Nothing
    End If
End Function

Sub Showspecialspaceinfo(method)
        dim fso,d,fc,f1,size,showsize,drvpath 		
        set fso=server.createobject("scripting.filesystemobject")
        drvpath=server.mappath(".\")
        drvpath=left(drvpath,(instrrev(drvpath,"\")-1))
        set d=fso.getfolder(drvpath) 		
	
        if method="All" then 		
               size=d.size
        elseif method="Program" then
               set fc=d.Files
               for each f1 in fc
                     size=size+f1.size
               next	
        end if	
	
        showsize=size & "&nbsp;Byte" 
        if size>1024 then
               size=(size\1024)
               showsize=size & "&nbsp;KB"
        end if
        if size>1024 then
       size=(size/1024)
       showsize=formatnumber(size,2) & "&nbsp;MB"		
       end if
       if size>1024 then
       size=(size/1024)
       showsize=formatnumber(size,2) & "&nbsp;GB"	   
       end if   
       response.write "<font face=verdana>" & showsize & "</font>"
       set fso=nothing
end sub 	 	 	

Function Showspecialspaceinfo2(method)            
         dim fso,drvpath ,d,size	
         set fso=server.createobject("scripting.filesystemobject")
         drvpath=server.mappath(".\")
         drvpath=left(drvpath,(instrrev(drvpath,"\")-1))
         set d=fso.getfolder(drvpath) 		
         if method="All" then 		
                size=d.size
         end if	
        Showspecialspaceinfo2=size
        set fso=nothing
end Function 

Function Drawspecialbar()
         dim fso,drvpathroot,d,fc,f1,size,totalsize,barsize
         set fso=server.createobject("scripting.filesystemobject")
         drvpathroot=server.mappath(".\")
         drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
         set d=fso.getfolder(drvpathroot)
         totalsize=d.size
	
         set fc=d.files
         for each f1 in fc
               size=size+f1.size
         next	
	
        barsize=cint((size/totalsize)*400)
        Drawspecialbar=barsize
        set fso=nothing
End Function 	

Function AllUpFileSize()       
         Dim rs1,spl1
         set rs1=server.createobject("adodb.recordset")
         sql1 = "select * FROM article"
         rs1.Open sql1,conn,1,2
               Dim ImgFileSize1
               ImgFileSize1 = 0
               do while not rs1.eof
                      Dim D_SavePathFileName1
                       if rs1("D_SavePathFileName")<>"" then
                              D_SavePathFileName1 = FileContentSize(rs1("D_SavePathFileName"))   ' FileContentSize(aaa)ȡϴļֽڴС
                       else
                              D_SavePathFileName1 = 0
                       end if
                       ImgFileSize1 = ImgFileSize1 + D_SavePathFileName1     
                       rs1.movenext
                loop
         rs1.close             
         set rs1=nothing
         Dim rs2,spl2
         set rs2=server.createobject("adodb.recordset")
         sql2 = "select * FROM reply"
         rs2.Open sql2,conn,1,2
               Dim ImgFileSize2
               ImgFileSize2 = 0
               do while not rs2.eof
                       Dim D_SavePathFileName2
                       if rs2("r_SavePathFileName")<>"" then
                              D_SavePathFileName2 = FileContentSize(rs2("r_SavePathFileName"))   
                       else
                              D_SavePathFileName2 = 0
                       end if
                       ImgFileSize2 = ImgFileSize2 + D_SavePathFileName2        
                       rs2.movenext
                loop
         rs2.close             
         set rs2=nothing
         Dim rs3,spl3
         set rs3=server.createobject("adodb.recordset")
         sql3 = "select * FROM option1"
         rs3.Open sql3,conn,1,2
                Dim ImgFileSize3
                ImgFileSize3 = 0
                do while not rs3.eof
                       Dim D_SavePathFileName3
                       if rs3("bulletin_SavePathFileName")<>"" then
                              D_SavePathFileName3 = FileContentSize(rs3("bulletin_SavePathFileName"))   
                       else
                              D_SavePathFileName3 = 0
                       end if
                       ImgFileSize3 = ImgFileSize3 + D_SavePathFileName3      
                        rs3.movenext
                loop
         rs3.close             
         set rs3=nothing
         AllUpFileSize= ImgFileSize1 + ImgFileSize2 + ImgFileSize3
End Function

%>